package com.zh.mp.demo.json;


import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.kafka.common.serialization.Deserializer;
import com.alibaba.fastjson.JSON;

import java.util.Map;

public class JSONDeserializer implements Deserializer<JSONArray> {

    @Override
    public void configure(Map<String, ?> configs, boolean isKey) {

    }

    @Override
    public JSONArray deserialize(String s, byte[] bytes) {
        return JSON.parseObject(bytes,JSONArray.class);
    }

    @Override
    public void close() {

    }
}
